<template>
  <div class="siteConten">
      <div class="siteNavBar">
          <van-nav-bar 
          title="地址管理" 
          :border="false" 
          left-arrow
          @click-left="goback"
          >
          </van-nav-bar>
      </div>
      <div class="siteBody">
          <van-address-list
            v-model="chosenAddressId"
            :list="list"
            default-tag-text="默认"
            add-button-text="新增收货地址"
            @add="goaddsite"
            />
      </div>
  </div>
</template>

<script>
export default {
    name: "site",
    data(){
        return{
            chosenAddressId: '1',
            list: [
                {
                id: '1',
                name: '张三',
                tel: '13000000000',
                address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
                isDefault: true,
                },
                {
                id: '2',
                name: '李四',
                tel: '1310000000',
                address: '浙江省杭州市拱墅区莫干山路 50 号',
                },
            ],
        }
    },
    methods:{
        goaddsite(){
            this.$router.push({path:'/addsite'})
        },
        goback(){
            this.$router.go(-1);
        }
    }
}
</script>

<style scoped>
.siteBody span{
    background-color: #00c657;
}
.siteBody button{
    background-color: #00c657;
    border: #00c657 2px solid;
}
.van-address-item__address{
    font-size:13px;
    font-family:PingFang SC;
    font-weight:500;
    color:rgba(169,174,192,1);
}
</style>